import { ITchPageParams, ITch, IHomePageChartParams } from '../type';
import service,{ baseURL } from './index';

export const teacher = {
  fileImportUrl: `${baseURL}/teacher/fileImport`,
  fileExportUrl: `${baseURL}/teacher/fileExport`,
  findPage: (data: ITchPageParams) => {
    return service({
      url: `/teacher/findPage`,
      method: 'post',
      data,
    });
  },
  delete: (data: string[]) => {
    return service({
      url: `/teacher/deleteByIds`,
      method: 'delete',
      data,
    });
  },
  save: (data: ITch) => {
    return service({
      url: `/teacher/save`,
      method: 'post',
      data,
    });
  },
  findHomePage: (params: IHomePageChartParams) => {
    return service({
      url: '/teacher/homePage',
      method: 'get',
      params,
    });
  },
}